package cn.zhibang.yygh2.service.hosp.repository;

import cn.zhibang.yygh2.model.model.hosp.Hospital;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 做为MongoDB数据访问层
 */
@Repository
public interface HospitalRepository extends MongoRepository<Hospital, String> {
    //Hospital指要操作的实体类，类型是String
    //根据医院编码查询医院对象
    Hospital getHospitalByHoscode(String hoscode);

    /**
     * 根据医院名称获取医院列表
     */
    List<Hospital> findHospitalByHosnameLike(String hosname);


}
